html,
body,
#app {
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
	word-break: break-word;
}

/* 解决 h1 标签在 webkit 内核浏览器中文字大小失效问题 */
:-webkit-any(article, aside, nav, section) h1 {
	font-size: 2em;
}
/* stylelint-disable scss/at-rule-no-unknown */
@tailwind base;
@tailwind components;
@tailwind utilities;
@tailwind variants;

/* flex */
.flx-center {
	display: flex;
	align-items: center;
	justify-content: center;
}
.flx-justify-between {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.flx-align-center {
	display: flex;
	align-items: center;
}
.primary-color {
	color: var(--el-color-primary);
}

/* clearfix */
.clearfix::after {
	display: block;
	height: 0;
	overflow: hidden;
	clear: both;
	content: "";
}

/* 文字单行省略号 */
.sle {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* 文字多行省略号 */
.mle {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

/* 文字多了自動換行 */
.break-word {
	word-break: break-all;
	word-wrap: break-word;
}

/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
	transition: all 0.2s;
}
.fade-transform-enter-from {
	opacity: 0;
	transition: all 0.2s;
	transform: translateX(-30px);
}
.fade-transform-leave-to {
	opacity: 0;
	transition: all 0.2s;
	transform: translateX(30px);
}

/* Breadcrumb */
.breadcrumb-enter-active {
	transition: all 0.2s;
}
.breadcrumb-enter-from,
.breadcrumb-leave-active {
	opacity: 0;
	transform: translateX(10px);
}

/* scroll bar */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
::-webkit-scrollbar-thumb {
	background-color: #d3d3d3;
	border-radius: 20px;
	box-shadow: inset 0 0 0 white;
}

//鼠标选中背景与字体
// ::selection {
// 	color: #ffffff;
// 	background-color: var(--el-color-primary);
// }

/* nprogress样式 */
#nprogress .bar {
	background: var(--el-color-primary) !important;
}
#nprogress .spinner-icon {
	border-top-color: var(--el-color-primary) !important;
	border-left-color: var(--el-color-primary) !important;
}
#nprogress .peg {
	box-shadow: 0 0 10px var(--el-color-primary), 0 0 5px var(--el-color-primary) !important;
}

/* 外边距、内边距全局样式 */
@for $i from 0 through 40 {
	.mt#{$i} {
		margin-top: #{$i}px !important;
	}
	.mr#{$i} {
		margin-right: #{$i}px !important;
	}
	.mb#{$i} {
		margin-bottom: #{$i}px !important;
	}
	.ml#{$i} {
		margin-left: #{$i}px !important;
	}
	.pt#{$i} {
		padding-top: #{$i}px !important;
	}
	.pr#{$i} {
		padding-right: #{$i}px !important;
	}
	.pb#{$i} {
		padding-bottom: #{$i}px !important;
	}
	.pl#{$i} {
		padding-left: #{$i}px !important;
	}
}
.font-12 {
	font-size: 12px;
}
.overflow-3 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

/* 弹框播放器器，不显示header和footer */
.el-dialog.video-dialog {
	background: transparent;
	box-shadow: none;
	.el-dialog__header,
	.el-dialog__footer {
		visibility: hidden;
		opacity: 0;
	}
}
.el-dialog.video-dialog:hover {
	background: #ffffff;
	box-shadow: var(--el-dialog-box-shadow);
	.el-dialog__header,
	.el-dialog__footer {
		visibility: visible;
		opacity: 1;
	}
}

// 弹框扩展的地址信息
.el-dialog {
	.el-dialog__body {
		position: relative;
		.address-detail {
			position: absolute;
			bottom: -38px;
			left: 15px;
			display: flex;
			align-items: center;
			width: calc(100% - 210px);
		}
	}
}
.border {
	border: 1px solid var(--el-border-color-darker);
}
.border-bottom {
	border-bottom: 1px solid var(--el-border-color-darker);
}
.readonly-form {
	.el-form-item {
		margin-bottom: 0;
	}
}
#app {
	font-size: 14px;
	.page-title {
		font-size: 16px;
	}
	.title-left-line {
		display: block;
		float: left;
		width: 4px;
		height: 24px;
		margin-right: 8px;
		background-color: var(--el-color-primary);
	}

	// table-search 表格搜索样式
	.table-search {
		padding: 18px 18px 0;
		margin-bottom: 15px;
		.el-form {
			.el-form-item__content > * {
				width: 100%;
			}

			// 去除时间选择器上下 padding
			.el-range-editor.el-input__wrapper {
				padding: 0 10px;
			}

			// el-select 为多选时不换行显示
			.el-select__tags {
				overflow: hidden;
				white-space: nowrap;
			}
		}
		.operation {
			display: flex;
			align-items: center;
			justify-content: flex-end;
			margin-bottom: 18px;
		}
	}
	.cursor-pointer {
		opacity: 1;
	}
	.cursor-pointer:active,
	.cursor-pointer:focus {
		opacity: 0.9;
	}
	.cursor-pointer:hover {
		color: var(--el-color-primary);
		opacity: 0.8;
	}
	.card-add:hover {
		background-color: var(--el-color-primary-light-9);
	}
	.ignore-search-split {
		.table-search {
			margin-bottom: 0;
			border-bottom: 1px solid #e8e8e8;
		}
	}
	.detail-type-detail {
		height: calc(100% + 55px);
		min-height: 450px;
		overflow: auto;
	}
	.iot-detail-content {
		height: calc(100% - 130px);

		// border: 1px solid var(--el-border-color-darker);
		box-shadow: 1px -1px 5px #d5d5d5;
	}
	.block-title {
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 40px;
		font-size: 15px;
		font-weight: bold;
	}
	.search-item {
		margin-right: 20px;
	}
	.block-nav {
		position: relative;
		padding-top: 5px;
		padding-bottom: 2px;
		background-color: #ffffff;
		border-bottom: 1px solid #e7e7e7;
		.item {
			position: relative;
			display: flex;
			align-items: center;
			height: 100%;
			i {
				opacity: 0.7;
			}
		}
		.item:hover {
			color: var(--el-color-primary);
			cursor: pointer;
		}
		.item.active {
			font-weight: bold;
			color: var(--el-color-primary);
			background-color: #ffffff;
			border-bottom: 2px solid #5073e9;
		}
		.toggle-detail-size:hover {
			opacity: 0.8;
		}
		.toggle-detail-size {
			position: absolute;
			right: 10px;
			padding: 10px;
			color: var(--el-color-primary);
			cursor: pointer;
		}
	}
	.overflow {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}
